<template>
  <div>
    <ul>
      <li v-for="i in pushArticles" :key="i.articleId">{{ i.title }}</li>
    </ul>
  </div>
</template>

<script setup>


import {useRoute} from "vue-router";
import {onMounted, ref} from "vue";
import {getUserArticleApi} from "@/api/articleApi.js";
import {useUserStore} from "@/store/userStore.js";

const route = useRoute();
const userStore = useUserStore();

onMounted(() => {
  console.log(1)
  getUserArticle()
})

let pushArticles = ref([])

async function getUserArticle() {
  let response = await getUserArticleApi(userStore.userInfo.userId, 1);
  pushArticles.value = response.data
}


</script>

<style lang="scss" scoped>

</style>